package com.ggs.rg.ybjb.adminmodule.mapper;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ggs.rg.ybjb.pojomodule.pojo.TOrder;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.sql.Wrapper;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * @author cxw
 * @since 2021-11-02
 */
@Mapper
public interface TOrderMapper extends BaseMapper<TOrder> {

    public List<HashMap<String,Object>> selectOrdersInfo(@Param("oid") String oid);

    public IPage<TOrder> selectOrders(Page<TOrder> page, @Param(Constants.WRAPPER) QueryWrapper wrapper, @Param("status") Integer status);

    public IPage<TOrder> selectUnpaidOrders(Page<TOrder> page, @Param(Constants.WRAPPER) QueryWrapper wrapper, @Param("status") Integer status);
//    public List<TOrder> selectStatusOrders(Integer status);

    //获取已付款的订单详情
    public TOrder selectOrderByOid(Long oid);

    //获取未付款的订单详情
    public TOrder selectUnpaidOrderByOid(Long oid);

    //根据手机号获取oid
    public List<TOrder> selectTOrderByPhone(String phone);

}
